package com.jerry.provider.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jerry.common.bean.User;
import com.jerry.provider.dao.UserDao;
import com.jerry.provider.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserDao userDao;

	@Override
	public List<User> list() {
		return userDao.findAll();
	}
	
	@Override
	public User get(Long id) {
		return userDao.findById(id);
	}
	
	@Override
	public boolean add(User user) {
		return userDao.add(user);
	}

	@Override
	public boolean update(User user) {
		return userDao.update(user);
	}
	
	@Override
	public void delete(Long id) {
		userDao.deleteById(id);
	}
	
}
